import { HTTP } from '../utils/http.js'

class Dynamic extends HTTP {

  // 首页banner查看动态详情
  dynamic_detail(objs) {
    return this.request({
      url: '/dynamic/dynamic_detail',
      method: 'POST',
      header: {
        'content-type': 'application/x-www-form-urlencoded'
      },
      data: objs
    })
  }

  // 查看动态所有评论
  comment_list(objs) {
    return this.request({
      url: '/dynamic/comment_list',
      method: 'POST',
      header: {
        'content-type': 'application/x-www-form-urlencoded'
      },
      data: objs
    })
  }

  // 发布评论
  save_comment(objs) {
    return this.request({
      url: '/dynamic/save_comment',
      method: 'POST',
      header: {
        'content-type': 'application/x-www-form-urlencoded'
      },
      data: objs
    })
  }

  // 喜欢/取消喜欢此动态
  like_this_dynamic(objs) {
    return this.request({
      url: '/dynamic/like_this_dynamic',
      method: 'POST',
      header: {
        'content-type': 'application/x-www-form-urlencoded'
      },
      data: objs
    })
  }

  // 删除评论
  delete_comment(objs) {
    return this.request({
      url: '/dynamic/delete_comment',
      method: 'POST',
      header: {
        'content-type': 'application/x-www-form-urlencoded'
      },
      data: objs
    })
  }

  

}

export { Dynamic }